﻿using Abp.Application.Services;
using Sunlit.House.Regions.Dto;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Sunlit.House.Regions
{
    public interface IRegionAppService : IAsyncCrudAppService<RegionDto, int, 
        GetAllRegionsInput, CreateRegionInput, UpdateRegionInput>
    {
        /// <summary>
        /// 获取级联数据ID
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<int>> GetCasCadeIdById(int id);
        /// <summary>
        /// 获取级联数据
        /// </summary>
        /// <returns>级联数据</returns>
        Task<List<ValueLabelCasCadeItem>> GetCasCadeData();
        Task<List<RegionDto>> GetTreeData(GetTreeDataInput input);
        Task<List<RegionDto>> GetProvincesAsync();
        Task<List<RegionDto>> GetCitiesAsync(int provinceId);
        Task<List<RegionDto>> GetHotRegionsAsync();
        Task<List<FirstLetterOutput>> GetAllCitiesGroupByFirstLetter();
        RegionDto GetRegionByName(string name);
    }
}
